package com.coupang.freshman.di;

import com.coupang.freshman.OneToTenDecorationNumberPrinter;
import com.coupang.freshman.OneToTenWordNumberPrinter;
import com.coupang.freshman.base.IOneToTenNumberPrinter;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @auth sdflower(돌군)
 * @since 2014. 6. 17. 오전 11:19
 */
public class SpringDIOneToTenNumberPrinter {
	public void execute() {
		System.out.println("Hello, Spring!");
	}
	public static void _main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("application-context.xml");
		SpringDIOneToTenNumberPrinter ob = ctx.getBean("oneToTenNumberPrinter", SpringDIOneToTenNumberPrinter.class);

		ob.execute();
	}

	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("application-context.xml");

		IOneToTenNumberPrinter obj1 = ctx.getBean("oneToTenWordNumberPrinter", OneToTenWordNumberPrinter.class);
		IOneToTenNumberPrinter obj2 = ctx.getBean("oneToTenDecorationNumberPrinter", OneToTenDecorationNumberPrinter.class);

		obj1.execute();
		obj2.execute();
	}
}
